<template>
	<view>
		<banner :bannerindex="bannerindex" :bannerList="guidepageImg" @bannercg="bannercg" />
	</view>
</template>

<script>
	import banner from '@/components/banner/bannerLoading'
	export default {
		data() {
			return {
				bannerindex:0,
				guidepageImg:[]
			}
		},
		components:{
			banner
		},
		onLoad() {
			this.getGuidepageImg();
			this.startTime();
		},
		methods: {
			getGuidepageImg(){
				this.$api.guidepage().then(res=>{
					this.guidepageImg = res;
				})
			},
			bannercg(e){
				this.bannerindex = e;
			},
			startTime(){
				let token = uni.getStorageSync('token');
				setTimeout(() => {
					uni.switchTab({
						url:'/pages/index/index'
					})
				},6000)
			}
		}
	}
</script>

<style lang="scss">

</style>
